/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DAO;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

/**
 *
 * @author Nobita Chau
 */
public class ExcuteUpdate {
     public static int ExcuteUpdate(String sql) {
        try {
            Connection conn = DBConnect.Connect();
            Statement st = conn.createStatement();
            int k = st.executeUpdate(sql);
            return 1;

        } catch (Exception ex) {
             System.err.println(ex);
          return 0;
        }
     }
 
}
